﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SPMS.Commons.Configuration
{
    /// <summary>
    /// 配置节点接口
    /// </summary>
    /// <remarks>定义了配置节点接口</remarks>
    /// <history>
    /// [zanezeng]   2008-11-13 11:19    Created
    /// </history>
    public interface IConfigurationNode
    {
        /// <summary>
        /// 获得配置节点的名称
        /// </summary>
        /// <value>配置节点的名称</value>
        /// <remarks></remarks>
        /// <history>
        /// [zanezeng]   2008-11-13 11:29    Created
        /// </history>
        string Name
        {
            get;
        }

        /// <summary>
        /// 获得当前配置节点所属的配置
        /// </summary>
        /// <value>当前配置节点所属的配置</value>
        /// <remarks></remarks>
        /// <history>
        /// [zanezeng]   2008-11-13 11:34    Created
        /// </history>
        IConfiguration Configuration
        {
            get;
        }

        /// <summary>
        /// 获得当前配置节点的父节点
        /// </summary>
        /// <value>当前配置节点的父节点</value>
        /// <remarks></remarks>
        /// <history>
        /// [zanezeng]   2008-11-13 11:33    Created
        /// </history>
        IConfigurationNode ParentNode
        {
            get;
        }

        /// <summary>
        /// 获得当前配置节点的值
        /// </summary>
        /// <value>当前配置节点的值</value>
        /// <remarks></remarks>
        /// <history>
        /// [zanezeng]   2008-11-13 11:31    Created
        /// </history>
        string Value
        {
            get;
        }

        /// <summary>
        /// 获得当前节点的属性
        /// </summary>
        /// <value>当前节点的属性</value>
        /// <remarks></remarks>
        /// <history>
        /// [zanezeng]   2008-11-13 11:28    Created
        /// </history>
        IDictionary<string, IConfigurationAttribute> Attributes
        {
            get;
        }

        /// <summary>
        /// 获得当前配置节点的所有子配置节点
        /// </summary>
        /// <value>当前配置节点的所有子配置节点</value>
        /// <remarks></remarks>
        /// <history>
        /// [zanezeng]   2008-11-13 11:28    Created
        /// </history>
        IList<IConfigurationNode> ChildNodes
        {
            get;
        }
    }
}
